<template>
  <div class="main_div" >
    <!-- 第一行，ID和badge -->
    <el-row type="flex" justify="space-between" class="first_row">
      <el-col :span="8">
        <span class="area_id_font" >{{ area_id }}</span>
      </el-col>

      <el-col :span="8"  style="text-align:right;">
        <el-tooltip :content="monitor_value + '个PI监控点'" placement="top-end">
          <el-badge :value="monitor_value" class="item" type="primary">
            <div></div>
          </el-badge>
        </el-tooltip>

        <el-tooltip :content="warning_value + '个异常监控点'" placement="top-start">
          <el-badge :value="warning_value" class="item" type="danger">
            <div></div>
          </el-badge>
        </el-tooltip>
      </el-col>
    </el-row>

    <el-row class="area_value_row"> 
          <span class="value_font">{{ area_value }}</span>      
          <span class="unit_font" >{{ area_unit }}</span>
    </el-row>
  </div>
</template>

<script>
export default {

    props:[
        'area_id',
        'area_value',
        'area_unit',
        'monitor_value',
        'warning_value',
    ],

    data() {
        return {};
    }
};
</script>

<style scoped>
  .main_div{
    height: 100px;
  }
  .first_row{
    
    height:25px;
    line-height: 25px;
    width:100%
  }
  .area_id_font{
    font-weight:bold; 
    color:slategray;
    font-size: 120%
  }
  .item {
    margin-top: -3px;
    margin-right: 25px;
  }
  .area_value_row{
      text-align: center;
      height: 50px;
      line-height: 50px;
      
  }
  .value_font{
      font-weight: bold;
      font-size: 160%;
      color: #14d288;
  }
  .unit_font{
    color:black;
    font-weight:normal;
    font-size: 120%;
  }
</style>


